package com.bwda.dsrs.filecenter.domain.exception;

/**
 * @author yangjun
 * @date 2019/3/18
 */
public class BusinessServiceException extends Exception {
    private static final int DEFAULT_ERROR_CODE = 201;
    private int errCode;

    public BusinessServiceException() {
        super();
    }

    public BusinessServiceException(String msg) {
        super(msg);
        this.errCode = DEFAULT_ERROR_CODE;
    }

    public BusinessServiceException(int errCode, String msg) {
        super(msg);
        this.errCode = errCode;
    }

    public BusinessServiceException(String msg, Throwable e) {
        super(msg, e);
        this.errCode = DEFAULT_ERROR_CODE;
    }

    public BusinessServiceException(int errCode, String msg, Throwable e) {
        super(msg, e);
        this.errCode = errCode;
    }


    public int getErrCode() {
        return errCode;
    }
}

